let archiver = require('archiver')
let fs = require('fs');
// 创建文件输出流
let output = fs.createWriteStream(__dirname + '/dist.zip')
let archive = archiver('zip', {
  zlib: { level: 9 } // 设置压缩级别
})
archive.pipe(output);
archive.directory('E:/work/1/game/messagePublish/app/middleware', false)
archive.finalize()